package us.x.slowexp.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import us.x.slowexp.dao.ExpressDao;
import us.x.slowexp.domain.Express;
import us.x.slowexp.service.ExpressService;

@Service
public class ExpressServiceImpl implements ExpressService {
	
	@Autowired
	public ExpressDao expressDao;

	public void addExpress(Express express) {
		this.expressDao.insert(express);
	}

	public String queryMaxNo() {
		return this.expressDao.queryMaxNo();
	}

	public void deleteExpress(Serializable expressNo) {
		this.expressDao.delete(expressNo);
	}

	public Express findById(Serializable expressNo) {
		return this.expressDao.findById(expressNo);
	}

	public void updateExpress(Express express) {
		this.expressDao.update(express);
	}

	public List<Express> findFinishedExpress() {
		return this.expressDao.findFinishedExpress();
	}

	public int queryUnfinishedCount() {
		return this.expressDao.queryUnfinishedCount();
	}

	public List<Express> queryHistoryExpress() {
		return this.expressDao.queryHistoryExpress();
	}

	public void add2HistoryExpress(Express express) {
		this.expressDao.add2HistoryExpress(express);
	}

}
